Processing Spectrum Data

Data Decoder Steps

(data decode for spectrum plot)

1.   Input packet from serial data (USB,RS232,INET)

2.   Verify packet type

3.   If spectrum data (with/without status) calculate number channels (see packet decode)

4.   Initialize data 8192 byte storage array

5.   Convert serial data string to U8 byte array

6.   Create plot values (start U8 read at byte 6, loop N-Channels)

6.1. Input U8 array of 3-byte values (Channel Value Array Subsets (index*3)+6,len=3)

6.2. Convert U8 3-byte number to U32/I32 values for each channel

6.3. 3-byte array to U32/I32

A. Get 3-byte channel value

B. Append U8 byte to MSB

C. Reverse byte order

D. Cast value to U32

E. Save value to I32 array

7. Save I32 array to double array for plotting